home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 October: Mac OS SDK / Dev.CD Oct 97 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / AIncludes / EPPC.a < prev    next >
Encoding:
Text File  |  1997-08-12  |  4.6 KB  |  164 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        EPPC.a
  3. ;
  4. ;    Contains:    High Level Event Manager Interfaces.
  5. ;
  6. ;    Version:    Technology:    System 7.5
  7. ;                Release:    Universal Interfaces 3.0.1
  8. ;
  9. ;    Copyright:    © 1988-1997 by Apple Computer, Inc., all rights reserved
  10. ;
  11. ;    Bugs?:        Please include the the file and version information (from above) with
  12. ;                the problem description.  Developers belonging to one of the Apple
  13. ;                developer programs can submit bug reports to:
  14. ;
  15. ;                    devsupport@apple.com
  16. ;
  17. ;
  18.     IF &TYPE('__EPPC__') = 'UNDEFINED' THEN
  19. __EPPC__ SET 1
  20.  
  21.     IF &TYPE('__ERRORS__') = 'UNDEFINED' THEN
  22.     include 'Errors.a'
  23.     ENDIF
  24.     IF &TYPE('__APPLETALK__') = 'UNDEFINED' THEN
  25.     include 'AppleTalk.a'
  26.     ENDIF
  27.     IF &TYPE('__FILES__') = 'UNDEFINED' THEN
  28.     include 'Files.a'
  29.     ENDIF
  30.     IF &TYPE('__PPCTOOLBOX__') = 'UNDEFINED' THEN
  31.     include 'PPCToolbox.a'
  32.     ENDIF
  33.     IF &TYPE('__PROCESSES__') = 'UNDEFINED' THEN
  34.     include 'Processes.a'
  35.     ENDIF
  36.     IF &TYPE('__EVENTS__') = 'UNDEFINED' THEN
  37.     include 'Events.a'
  38.     ENDIF
  39.  
  40.  
  41.                                                             ; postOptions currently supported 
  42. receiverIDMask                    EQU        $0000F000
  43. receiverIDisPSN                    EQU        $00008000
  44. receiverIDisSignature            EQU        $00007000
  45. receiverIDisSessionID            EQU        $00006000
  46. receiverIDisTargetID            EQU        $00005000
  47. systemOptionsMask                EQU        $00000F00
  48. nReturnReceipt                    EQU        $00000200
  49. priorityMask                    EQU        $000000FF
  50. nAttnMsg                        EQU        $00000001
  51.  
  52.                                                             ; constant for return receipts 
  53. HighLevelEventMsgClass            EQU        'jaym'
  54. rtrnReceiptMsgID                EQU        'rtrn'
  55.  
  56. msgWasPartiallyAccepted            EQU        2
  57. msgWasFullyAccepted                EQU        1
  58. msgWasNotAccepted                EQU        0
  59. TargetID                RECORD 0
  60. sessionID                 ds.l    1                ; offset: $0 (0)
  61. name                     ds        PPCPortRec        ; offset: $4 (4)
  62. location                 ds        LocationNameRec ; offset: $4C (76)
  63. recvrName                 ds        PPCPortRec        ; offset: $B4 (180)
  64. sizeof                     EQU *                    ; size:   $FC (252)
  65.                         ENDR
  66. ; typedef struct TargetID *                TargetIDPtr
  67.  
  68. ; typedef TargetIDPtr *                    TargetIDHandle
  69.  
  70. ; typedef TargetIDHandle                 TargetIDHdl
  71.  
  72. SenderID                RECORD 0
  73. f                         ds        TargetID
  74. sizeof                     EQU *                    ; size:   $FC (252)
  75.                         ENDR
  76.  
  77.  
  78. ; typedef struct SenderID *                SenderIDPtr
  79.  
  80. HighLevelEventMsg        RECORD 0
  81. HighLevelEventMsgHeaderLength  ds.w 1            ; offset: $0 (0)
  82. version                     ds.w    1                ; offset: $2 (2)
  83. reserved1                 ds.l    1                ; offset: $4 (4)
  84. theMsgEvent                 ds        EventRecord        ; offset: $8 (8)
  85. userRefcon                 ds.l    1                ; offset: $18 (24)
  86. postingOptions             ds.l    1                ; offset: $1C (28)
  87. msgLength                 ds.l    1                ; offset: $20 (32)
  88. sizeof                     EQU *                    ; size:   $24 (36)
  89.                         ENDR
  90. ; typedef struct HighLevelEventMsg *    HighLevelEventMsgPtr
  91.  
  92. ; typedef HighLevelEventMsgPtr *        HighLevelEventMsgHandle
  93.  
  94. ; typedef HighLevelEventMsgHandle         HighLevelEventMsgHdl
  95.  
  96. ;
  97. ; pascal OSErr PostHighLevelEvent(const EventRecord *theEvent, void *receiverID, unsigned long msgRefcon, void *msgBuff, unsigned long msgLen, unsigned long postingOptions)
  98. ;
  99.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  100.         Macro
  101.         _PostHighLevelEvent
  102.             move.w              #$0034,-(sp)
  103.             dc.w                $A88F
  104.         EndM
  105.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  106.         IMPORT_CFM_FUNCTION PostHighLevelEvent
  107.     ENDIF
  108.  
  109. ;
  110. ; pascal OSErr AcceptHighLevelEvent(TargetID *sender, unsigned long *msgRefcon, void *msgBuff, unsigned long *msgLen)
  111. ;
  112.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  113.         Macro
  114.         _AcceptHighLevelEvent
  115.             move.w              #$0033,-(sp)
  116.             dc.w                $A88F
  117.         EndM
  118.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  119.         IMPORT_CFM_FUNCTION AcceptHighLevelEvent
  120.     ENDIF
  121.  
  122. ;
  123. ; pascal OSErr GetProcessSerialNumberFromPortName(const PPCPortRec *portName, ProcessSerialNumber *pPSN)
  124. ;
  125.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  126.         Macro
  127.         _GetProcessSerialNumberFromPortName
  128.             move.w              #$0035,-(sp)
  129.             dc.w                $A88F
  130.         EndM
  131.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  132.         IMPORT_CFM_FUNCTION GetProcessSerialNumberFromPortName
  133.     ENDIF
  134.  
  135. ;
  136. ; pascal OSErr GetPortNameFromProcessSerialNumber(PPCPortRec *portName, const ProcessSerialNumber *pPSN)
  137. ;
  138.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  139.         Macro
  140.         _GetPortNameFromProcessSerialNumber
  141.             move.w              #$0046,-(sp)
  142.             dc.w                $A88F
  143.         EndM
  144.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  145.         IMPORT_CFM_FUNCTION GetPortNameFromProcessSerialNumber
  146.     ENDIF
  147.  
  148. ;
  149. ; pascal Boolean GetSpecificHighLevelEvent(GetSpecificFilterUPP aFilter, void *contextPtr, OSErr *err)
  150. ;
  151.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  152.         Macro
  153.         _GetSpecificHighLevelEvent
  154.             move.w              #$0045,-(sp)
  155.             dc.w                $A88F
  156.         EndM
  157.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  158.         IMPORT_CFM_FUNCTION GetSpecificHighLevelEvent
  159.     ENDIF
  160.  
  161.  
  162.     ENDIF ; __EPPC__ 
  163.  
  164.